{% load i18n %}
{% if action_choices %}
	{% if not cl.pop %}
		{% if cl.opts %}
			{% for name, descr, icon in action_choices %}
			<a class="btn btn-sm btn-default" onclick="$.do_action('{{name}}');">{{descr}}</a>
			{% endfor %}
      	{% else %}
			{% for url, descr, icon in action_choices %}
			<a href="{{url}}" class="btn btn-primary" onclick="return $.do_form_action(this);"><i class="{{icon}}"></i> {{descr}}</a>
			{% endfor %}
      	{% endif %}
    {% endif %}

    {% if action_choices_more %}
  <div class="btn-group clearfix">
    <a class="dropdown-toggle btn btn-sm btn-default" data-toggle="dropdown" href="#">
        更多
        <span class="caret"></span>
    </a>
    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
      {% for name, descr, icon in action_choices_more %}
        <li><a onclick="$.do_action('{{name}}');"><i class="{{icon}}"></i> {{descr}}</a></li>
      {% endfor %}
    </ul>
  </div>
    {% endif %}
{% endif %}

<script type="text/javascript">var _actions_icnt="{{ cl.result_list|length|default:"0" }}";</script>
